package com.bwie.system.service.impl;

import com.bwie.common.pojo.res.LoginRes;
import com.bwie.system.mapper.UserMapper;
import com.bwie.system.service.UserService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class UserServiceImpl implements UserService {
    private final UserMapper userMapper;

    /**
     * 根据用户名查询用户信息
     * @param userName
     * @return
     */
    @Override
    public LoginRes getUserByUserName(String userName) {
        return userMapper.getUserByUserName(userName);
    }

    /**
     * 根据手机号查询用户信息
     * @param phone
     * @return
     */
    @Override
    public LoginRes getUserByPhone(String phone) {
        return userMapper.getUserByPhone(phone);
    }
}
